import { FC, useMemo } from "react";
import { Outlet } from 'umi';

import mitt from "mitt";

import GlobalContext from "@/context";

const BasicLayout: FC<any> = (props) => {
  const { children } = props;
  sessionStorage.setItem('MODULE_KEY', 'arcv');

  const emitter = useMemo(() => {
    return mitt();
  }, []);
  return (
    <GlobalContext.Provider value={{ emitter }}>
      {/*{children}*/}
      <Outlet />
    </GlobalContext.Provider>
  );
};

export default BasicLayout;
